﻿namespace com.eforceglobal.crux.DTOs
{
    public class UserInformation
    {
        private string _FirstName;
        private string _LastName;
        private string _MiddleName;
        public int UserID { get; set; }

        public string UserName
        {
            get { return UserEmailAddress; }
            set { UserEmailAddress = value; }
        }

        public string FirstName
        {
            get { return _FirstName; }
            set { _FirstName = value; }
        }

        public string MiddleName
        {
            get { return _MiddleName; }
            set { _MiddleName = value; }
        }

        public string LastName
        {
            get { return _LastName; }
            set { _LastName = value; }
        }

        public string UserComments { get; set; }


        public string Password { get; set; }

        public int CompanyID { get; set; }

        public string CompanyName { get; set; }

        public string FullName
        {
            get
            {
                if (string.IsNullOrEmpty(_MiddleName))
                    return _FirstName + " " + _LastName;
                return _FirstName + " " + _MiddleName + " " + _LastName;
            }
        }

        public string UserEmailAddress { get; private set; }
    }
}